package com.xnyzc.lhy.finance.mapper.bank;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xnyzc.lhy.finance.entity.bank.OaDBindBankCard;
import com.xnyzc.lhy.finance.entity.bank.OaSysCpBank;
import com.xnyzc.lhy.finance.params.vo.bank.DriverBindBankCardVO;
import org.apache.ibatis.annotations.Param;

import java.util.*;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author cuixiaojian
 * @since 2019-10-18
 */
public interface OaDBindBankCardMapper extends BaseMapper<OaDBindBankCard> {

    List<Map<String, Object>> getBank();

    /**
     * 检查司机银行卡绑定个数
     * @param driverId 司机ID
     * @return int
     */
    Integer checkBankCardBindStatus(@Param("driverId")Long driverId);

    /**
     * 司机绑定银行卡列表
     * @param driverId 司机ID
     * @return List<DriverBindBankCardVO>
     */
    List<DriverBindBankCardVO> driverBindBankCardList(@Param("driverId")Long driverId);

    /**
     * 查询类型
     */
    Map<String, String> getType(String type);

    /**
     * 查询司机姓名
     */
    String getDriverName(@Param("driverId") Long driverId);

    List<Map<String, String>> myCard(@Param("driverId")Long driverId);

    /**
     * 根据bankID查询对应银行code
     */
    OaSysCpBank queryCodeByBankId(@Param("bankId") String bankId);

}
